class Solution(object):
    def sumOfTheDigitsOfHarshadNumber(self, x):
        """
        :type x: int
        :rtype: int
        """
        numberList = []
        for numb in str(x):
            numberList.append(int(numb))
        print(numberList)
        all = sum(numberList)
        if x % all == 0:
            return all
        else:
            return -1